6-2 Introduction to Java
NATHAN MULLER
Developed by Sun Microsystems and introduced in 1995, Java is described by the company as a simple, robust, object-oriented, platform-independent, multi-threaded, dynamic, general-purpose programming environment.
Simply put, Java is a scaled down version of the C++ programming language that omits many rarely used, poorly understood, and confusing features. It is used for creating applets for use on the Internet, intranets and any other complex, distributed network. Since introducing Java, responsibility for its development and marketing have been handed off to JavaSoft, a new business unit of Sun Microsystems. Java provides the capability for distributing specific software functions to end-users in the form of Applets, regardless of their location, hardware platform, hardware storage space or processing power.
While Java is a compiled general purpose language that can be used to build a variety of business applications, JavaScript is a creation of Netscape Communications and is an interpreted scripting language that is focused on manipulating documents on the World Wide Web. JavaScript provide the means of adding interesting features to documents published on the Web, particularly those rendered by Netscape Navigator (version 2.0 or above). The scripts are embedded in the HTML document itself.
The hypertext markup language (HTML) provides a set of tags that tell Web browsers how to render various elements of a document so it will be viewed as the author intended. A script placed between an HTML documents <HEAD> and </HEAD> tags can add such things as simple animations, a scrolling banner, digital clock, and other features to the Web page. It can also be used to open additional windows from within the browsers main window.
With browser software that is Java-enabled, the user has access to the functionality provided by Java applets and Java scripts. A browser that is &147;Java-enabled&148; is one that has a built-in Java interpreter. If the browser software is not Java-enabled, the applets and scripts are not available to the user and, in most cases, will be hidden from view. However, JavaScript offers limited functionality and it is not to be confused with Java.
JAVA APPLETS
Applets are distributed programs that are sent from Web servers to Web clients (i.e., PCS equipped with browsers) that have built-in Java interpreters. Applets can reduce hardware requirements at the desktop for many casual end users because both applications storage and processing take place at the server.
With the exception of the browser, software is maintained only at the server site, reducing the burden on IS staff. Applet technology can also help reduce the learning curve because casual users are given access to only the features they need for completing specific business transactions.
Applets provide World Wide Web users with ready access from their local system to additional Web page content that can be delivered in a more visually compelling way, such as through the use of animation. The user can view and interact with an appletsuch as requesting that a product image rotate to provide a fuller view of its appearanceand then discard it when it is no longer needed. Applets reside on a Web server and are called from within a HTML document. This allows the same applet to be used by many users. Applets also provide many other functions, such as access to corporate data bases.
For example, through an electronic requisition applet, users can have easy access to central data bases for online corporate and vendor catalogs. Users can also download an electronic form for requesting purchases. Once the user has completed a request, it is automatically routed for approval and processing through a workflow application. Casual users of the procurement system can access the applet via a browser without running a copy of the client application on their desktop.
DEVELOPING CORPORATE APPLICATIONS WITH JAVA
Whether Java is a good choice for corporate applications development depends on how well Java can contribute to improvements in the following key areas of IS:
- Speed of applications development.
- Applications effectiveness and efficiency.
- Program and programmer portability.
- Development costs.
- Maintenance and support.
- Technical training.
Speed of Applications Development
The Java language was designed as an object-oriented language from the ground up. The needs of distributed, client/server-based systems coincide with the packaged, message-passing paradigms of object-based software.
To function within increasingly complex, network-based environments, programming systems must adopt object-oriented concepts. The Java language provides a clean and efficient object-based development environment.
A key feature of object-oriented programming is code extensibility, a characteristic of objects that lets application developers reuse them to build, maintain, and enhance applications without having to access the programs source code. The ability to create new objects from existing objects, change them to suit specific needs, and otherwise reuse them across different applications offers an effective means of developing applications faster.
Applications Effectiveness and Efficiency
Large corporate applications development environments stress effectiveness over efficiency. Getting the work done is valued more than getting the work done efficiently. Being a simpler language than C++, Java allows programmers to concentrate on the application instead of the mechanics of building the application.
For example, programmers need not worry about managing memory-allocating memory, freeing memory, and keeping track of what memory can be freed because Java self-manages memory. Automatic garbage collection is an integral part of the Java language and run time system. Once an object has been allocated, the run time system keeps track of the objects status and automatically reclaims memory when objects are no longer in use, freeing memory for future use.
The Javas memory allocation model and automatic garbage collection make programming tasks easier and cut down on program bugs, crashes, and memory leaks that inhibit performance. In general, these Java features provide better performance than would be obtained through explicit memory management.
Freeing programmers of this and other tedious responsibilities allows work to be done efficiently as well as effectively.
|